#pragma once
#include <iostream>
#include "cocos2d.h"

using namespace std;
using namespace cocos2d;

class StartLayer : public Layer
{
	static StartLayer* thisLayer;

public:
	static StartLayer* getInstance();
	virtual bool init();
	static Scene* createScene();

	CREATE_FUNC(StartLayer);

private:
	MenuItem* m_pButtonStart = nullptr;
	MenuItem* m_pButtonScore = nullptr;
	MenuItem* m_pButtonExit = nullptr;
	MenuItem* m_pButton3Player = nullptr;
	MenuItem* m_pButton4Player = nullptr;
	MenuItem* m_pButton5Player = nullptr;
	MenuItem* m_pButtonBack = nullptr;
	MenuItem* m_pButtonSet = nullptr;

	Sprite* m_pIcon1 = nullptr;
	Sprite* m_pIcon2 = nullptr;
	Sprite* m_pIcon3 = nullptr;

	bool m_bButtonLayer1InUse = true;
	bool m_bButtonLayer2InUse = false;

	void onStartButtonClick();
	void onScoreButtonClick();
	void onExitButtonClick();
	void onStartWithPlayerCountClick(int nCount);
	void onBackButtonClick();
	void onSetButtonClick();

	void show2LayerButtons();
	void show1LayerButtons();
};
